

; Destruction Class
; calls *world* destroy method for each collided pixel and then dies

(load "physics-object.scm")

(define destruction%
  (class physics-object%
    
    ; PRIVATE VARIABLES
    (define destroy #f)
    
    ; Collide
    (define/override (collide x y collision)
      (set! destroy #t)
      (send *world* destroy x y))
    
    ; Update
    (define/override (update)
      (not destroy))
    
    ; Constructor/Initialization
    (super-new [solid #f] [affected-by-gravity #f])))

